import java.util.Arrays;
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        int[] arr = new int[6];
        Scanner scanner = new Scanner(System.in);
        for (int i = 0; i < arr.length; i++) {
            arr[i] = scanner.nextInt();
        }
        System.out.println(Arrays.toString(arr));

        // 拿一个新的依次数组接收，最后赋值给arr
        int[] temp = new int[6];
        for(int i = arr.length; i > 0; i--){
            temp[arr.length-i] = arr[i-1];
        }
        arr = temp;

        System.out.println(Arrays.toString(arr));
    }
}


for(int left = 0, right = arr.length-1; right >= left; right--,left++){
        int temp = 0;
        temp = arr[left];
        arr[left] = arr[right];
        arr[right] = temp;
        }